<template>
    <div class="center">
       
    </div>
</template>
<script>
import { centerlist } from '../api/api'
export default {
    data() {
        return {
            categoryName: [
                { categoryName: '手机' },
                { categoryName: '保护套' },
                { categoryName: '电视机' },
                { categoryName: '充电器' },
                { categoryName: "空调" }
            ],
            list: []
        }
    },
    methods: {
        getlist() {
            for (let item of this.categoryName) {
                centerlist(item).then(res => {
                    this.list = res.Product
                    console.log(this.list);
                })
            }

        }
    },
    computed: {},
    components: {},
    created() {
        this.getlist();
    },
}
</script>
<style lang="scss" scoped>
.center {
    .header{
        width: 100%;
        background: red;
    }
}
</style>